Optimal. Leaf size=119 \[ \frac {b f p q}{2 h (f g-e h) (g+h x)}+\frac {b f^2 p q \log (e+f x)}{2 h (f g-e h)^2}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}-\frac {b f^2 p q \log (g+h x)}{2 h (f g-e h)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {2442, 46, 2495}
\begin {gather*} -\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}+\frac {b f^2 p q \log (e+f x)}{2 h (f g-e h)^2}-\frac {b f^2 p q \log (g+h x)}{2 h (f g-e h)^2}+\frac {b f p q}{2 h (g+h x) (f g-e h)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 2442
Rule 2495
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^3} \, dx &=\text {Subst}\left (\int \frac {a+b \log \left (c d^q (e+f x)^{p q}\right )}{(g+h x)^3} \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(b f p q) \int \frac {1}{(e+f x) (g+h x)^2} \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}+\text {Subst}\left (\frac {(b f p q) \int \left (\frac {f^2}{(f g-e h)^2 (e+f x)}-\frac {h}{(f g-e h) (g+h x)^2}-\frac {f h}{(f g-e h)^2 (g+h x)}\right ) \, dx}{2 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right )\\ &=\frac {b f p q}{2 h (f g-e h) (g+h x)}+\frac {b f^2 p q \log (e+f x)}{2 h (f g-e h)^2}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{2 h (g+h x)^2}-\frac {b f^2 p q \log (g+h x)}{2 h (f g-e h)^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.09, size = 187, normalized size = 1.57 \begin {gather*} -\frac {a f^2 g^2-2 a e f g h+a e^2 h^2-b f^2 g^2 p q+b e f g h p q-b f^2 g h p q x+b e f h^2 p q x-b f^2 p q (g+h x)^2 \log (e+f x)+b (f g-e h)^2 \log \left (c \left (d (e+f x)^p\right )^q\right )+b f^2 g^2 p q \log (g+h x)+2 b f^2 g h p q x \log (g+h x)+b f^2 h^2 p q x^2 \log (g+h x)}{2 h (f g-e h)^2 (g+h x)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.21, size = 0, normalized size = 0.00 \[\int \frac {a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )}{\left (h x +g \right )^{3}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.30, size = 176, normalized size = 1.48 \begin {gather*} \frac {1}{2} \, b f p q {\left (\frac {f \log \left (f x + e\right )}{f^{2} g^{2} h - 2 \, f g h^{2} e + h^{3} e^{2}} - \frac {f \log \left (h x + g\right )}{f^{2} g^{2} h - 2 \, f g h^{2} e + h^{3} e^{2}} + \frac {1}{f g^{2} h - g h^{2} e + {\left (f g h^{2} - h^{3} e\right )} x}\right )} - \frac {b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right )}{2 \, {\left (h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h\right )}} - \frac {a}{2 \, {\left (h^{3} x^{2} + 2 \, g h^{2} x + g^{2} h\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 315 vs.
\(2 (116) = 232\).
time = 0.39, size = 315, normalized size = 2.65 \begin {gather*} \frac {b f^{2} g h p q x + b f^{2} g^{2} p q - a f^{2} g^{2} - a h^{2} e^{2} - {\left (b f h^{2} p q x + b f g h p q - 2 \, a f g h\right )} e + {\left (b f^{2} h^{2} p q x^{2} + 2 \, b f^{2} g h p q x + 2 \, b f g h p q e - b h^{2} p q e^{2}\right )} \log \left (f x + e\right ) - {\left (b f^{2} h^{2} p q x^{2} + 2 \, b f^{2} g h p q x + b f^{2} g^{2} p q\right )} \log \left (h x + g\right ) - {\left (b f^{2} g^{2} - 2 \, b f g h e + b h^{2} e^{2}\right )} \log \left (c\right ) - {\left (b f^{2} g^{2} q - 2 \, b f g h q e + b h^{2} q e^{2}\right )} \log \left (d\right )}{2 \, {\left (f^{2} g^{2} h^{3} x^{2} + 2 \, f^{2} g^{3} h^{2} x + f^{2} g^{4} h + {\left (h^{5} x^{2} + 2 \, g h^{4} x + g^{2} h^{3}\right )} e^{2} - 2 \, {\left (f g h^{4} x^{2} + 2 \, f g^{2} h^{3} x + f g^{3} h^{2}\right )} e\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: NotImplementedError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 359 vs.
\(2 (116) = 232\).
time = 3.18, size = 359, normalized size = 3.02 \begin {gather*} \frac {b f^{2} h^{2} p q x^{2} \log \left (f x + e\right ) - b f^{2} h^{2} p q x^{2} \log \left (h x + g\right ) + 2 \, b f^{2} g h p q x \log \left (f x + e\right ) - 2 \, b f^{2} g h p q x \log \left (h x + g\right ) + b f^{2} g h p q x - b f h^{2} p q x e + 2 \, b f g h p q e \log \left (f x + e\right ) - b f^{2} g^{2} p q \log \left (h x + g\right ) + b f^{2} g^{2} p q - b f g h p q e - b h^{2} p q e^{2} \log \left (f x + e\right ) - b f^{2} g^{2} q \log \left (d\right ) + 2 \, b f g h q e \log \left (d\right ) - b f^{2} g^{2} \log \left (c\right ) + 2 \, b f g h e \log \left (c\right ) - b h^{2} q e^{2} \log \left (d\right ) - a f^{2} g^{2} + 2 \, a f g h e - b h^{2} e^{2} \log \left (c\right ) - a h^{2} e^{2}}{2 \, {\left (f^{2} g^{2} h^{3} x^{2} - 2 \, f g h^{4} x^{2} e + 2 \, f^{2} g^{3} h^{2} x + h^{5} x^{2} e^{2} - 4 \, f g^{2} h^{3} x e + f^{2} g^{4} h + 2 \, g h^{4} x e^{2} - 2 \, f g^{3} h^{2} e + g^{2} h^{3} e^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.26, size = 180, normalized size = 1.51 \begin {gather*} \frac {b\,f^2\,p\,q\,\mathrm {atanh}\left (\frac {2\,e^2\,h^3-2\,f^2\,g^2\,h}{2\,h\,{\left (e\,h-f\,g\right )}^2}+\frac {2\,f\,h\,x}{e\,h-f\,g}\right )}{h\,{\left (e\,h-f\,g\right )}^2}-\frac {b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}{2\,h\,\left (g^2+2\,g\,h\,x+h^2\,x^2\right )}-\frac {\frac {a\,e\,h-a\,f\,g+b\,f\,g\,p\,q}{e\,h-f\,g}+\frac {b\,f\,h\,p\,q\,x}{e\,h-f\,g}}{2\,g^2\,h+4\,g\,h^2\,x+2\,h^3\,x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________